The present invention relates generally to power control for computers, and more specifically to an automatic power button override for computers.
The power button on computers is a familiar feature. One of the tasks the power button performs is powering down a computer. However, computers are complex devices and can not be turned on and off like a light bulb without the possibility of damaging the computer. Computers run various processes and operations that can lose data or damage system files if they are abruptly terminated. Consequently, powering down a computer is a more complicated process than simply turning off a light bulb or other switch. For example, a cache temporarily stores data before it is written to a drive or system memory. Data cached in volatile memory is lost when the computer is powered off. If a cache is powered down prematurely, critical data may be lost.
Computers may contain power management controllers that allow the user to safely power down a computer. Power management controllers react to power button input by generating a system interrupt. The system interrupt may trigger an operating system (OS) based power management controller or a basic input/output system (BIOS) power management controller to handle the power button push event. The system software (BIOS or OS based power management handler) can then handle the power button push event according to its overall power management policies. Some system software could initiate a controlled system shut down or a transition to a sleep state. This software may power down the computer or it may force the computer system to progress to a shut down state in which the power can be turned off without damaging the computer or losing data. Generally, this software permits caches and other processes to finish critical operations before the system is powered down. However, in many cases, such power management controllers are not used and a user can still just hit the power switch to power down the system. Furthermore, the system software may halt or fail to respond to the event which can result in a hard locked state. When a system is in a hard locked state, the system fails to respond to a power button push. The user experiences a computer system that will not shut down.
A way to avoid a user inadvertently or damagingly shutting down the file system or file structure with the power button while avoiding a computer system that will not shut down is to utilize an override mechanism for the power button. The override mechanism generally requires a user to hold the power button for 4 seconds to force a unconditional system shut down. This can permit a user to shut down a locked computer system.
The override mechanism presents a number of problems. Many users are not aware of the override mechanism and are unable to initiate a shut down of their computers if their computers are locked. Furthermore, users do not expect or appreciate a response time of 4 seconds. Users generally expect an immediate or near immediate response. Additionally, users who are unaware of the override mechanism often resort to potentially more destructive methods of powering down their system such as unplugging the computer system from its power source.
Therefore, there is a need in the art for a user friendly mechanism that allows shutting down of computer systems even if they are locked and which prevents inadvertent shut downs.
In one embodiment, a method for powering down a computer system is disclosed in which the computer power button is actuated, generating an interrupt. An unconditional shut down is performed if system software fails to respond to the interrupt. On the system software responding to the interrupt, the system software powers down the computer system.
In another embodiment, a computer system with a power button override is disclosed. The computer includes a power button, an automatic override mechanism coupled to the power button, a power handler coupled to the power button and the automatic override mechanism and a computer coupled to the power handler and the automatic override mechanism. The power button generates a power button event when actuated. The power handler handles the power button event. The automatic override mechanism shuts down the computer on the power handler malfunctioning.
Other embodiments are described and claimed.